﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace jaysJourney_v01.Utils
{
    public static class Formater
    {
        // Formats a given time (IN MILLISECONDS) into following format 00:00:000 (MM:SS:MILLISECS)

        public static String formatTime(int time)
        {
            int bTime = time;
            int milisecs = bTime % 1000;
            bTime = bTime / 1000;
            int secs = bTime % 100;
            bTime = bTime / 100;
            String fTime = "";
            if (bTime < 10) fTime += "0";
            fTime += bTime.ToString() + ":";
            if (secs < 10) fTime += "0";
            fTime += secs.ToString() + ":" + milisecs;

            return fTime;
        }
    }
}
